projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1efc5f8
)
Fix puny-encoding all-non-ASCII domains
author
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 28 Dec 2015 23:07:50 +0000
(
00:07
+0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 28 Dec 2015 23:07:50 +0000
(
00:07
+0100)
* puny.el (puny-encode-string): Fix the all-non-ASCII encoding case.
lisp/net/puny.el
patch
|
blob
|
history
diff --git
a/lisp/net/puny.el
b/lisp/net/puny.el
index a16e3a07706834aff81e372b41f50664a7daabf0..d96c6c22196ae04700545432b4a65ce4de4f2ba6 100644
(file)
--- a/
lisp/net/puny.el
+++ b/
lisp/net/puny.el
@@
-47,7
+47,11
@@
For instance, \"bücher\" => \"xn--bcher-kva\"."
string)))
(if (= (length ascii) (length string))
string
- (concat "xn--" ascii "-" (puny-encode-complex (length ascii) string)))))
+ (concat "xn--"
+ (if (null ascii)
+ ""
+ (concat ascii "-"))
+ (puny-encode-complex (length ascii) string)))))
(defun puny-decode-domain (domain)
"Decode DOMAIN according to the IDNA/punycode algorith.